/*
 *  rigidlink.h
 *  EPPI-0.0
 *
 *  Created by Juan Carlos Garcia Orden on 26/11/10.
 *
 */
 
#ifndef _rigidlink_h_
#define _rigidlink_h_

#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <sstream>
#include "mecsystem.h"
#include "BODIES/body.h"
//#include "COMPONENTS/consdis.h"
#include "CONSTRAINTS/consdis.h"

class MecSystem;

using namespace std;

class RigidLink : public Joint
{
public:
	double mass;
	string pointNameA;
	string pointNameB;
	/*	Data members from the base class Joint
	string name;
	int dim;	
	MecSystem* parentSystem;				
	vector<Component*> vComponents;
	vector<Component*> vLoads;
 	string outGraphFilex;
	vector<string> vPointNamesSurface;
	vector<Point*> vPPointSurface;
	ofstream localFGraph;
*/

public:
	RigidLink(){}
	RigidLink(ifstream &, string, MecSystem*);
	RigidLink(ifstream &, string, vector<string> &, MecSystem*);
	~RigidLink(){}
	
	/** Virtual functions from base */
//	void setPTPointsComp();		/** Set pointers to points in each component */
//	void setPTPointsLoad();		/** Set pointers to points in each load */
	void setPTPointsCons();		/** Set pointers to points in each constraint */
//	void setPTBodies();			/** Set pointers to the bodies, based on the list of body names */
	void setPPointSurface();	/** Set pointers to surface points in each component */
	void writeMSH(ofstream&);
	void writeVTU(ofstream&);		
	void writeOOGL(ofstream&);
//	void writeFileTemp(const double&, ofstream &);
//	void setIniPosJoint(vector<double>&);
	
	/** Local functions */
	
};

#endif
